# -*- perl -*-

use Test::More 'no_plan';
use Test::Exception;
use strict;
use warnings;
use Error::Common;

sub func1 {
  my @args = assert_param_refs [@_], [qw(HASH ARRAY CODE)];
}

throws_ok {
  func1({},[],[]);
}
  'Error::IllegalArgument',
  'param check';

is( $@->stacktrace, <<TEXT,
Expected CODE, got ARRAY as third argument of main::func1 at t/003_assert_refs.t line 10
\tmain::func1() called at t/003_assert_refs.t line 14
\tTest::Exception::throws_ok() called at t/003_assert_refs.t line 16
TEXT
    'error report'
  );
